package com.gict.antifraudback.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gict.antifraudback.entity.QuestionOption;
import com.gict.antifraudback.mapper.QuestionOptionMapper;
import com.gict.antifraudback.service.QuestionOptionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class questionOptionServiceImpl extends ServiceImpl<QuestionOptionMapper, QuestionOption>
    implements QuestionOptionService {
	
	@Autowired
	private QuestionOptionMapper questionOptionMapper;

	@Override
	public List<QuestionOption> listByQuestions(List<Integer> questionIds) {
		LambdaQueryWrapper<QuestionOption> wrapper = Wrappers.lambdaQuery();
		wrapper.in(QuestionOption::getQuestionId, questionIds);
		return list(wrapper);
	}
}
